<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>  
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>  
<%  
String path = request.getContextPath();  
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";  
%>  
  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">  
<html>  
<head>  
<base href="<%=basePath%>">  
<title>user list page</title>  
  
<meta http-equiv="pragma" content="no-cache">  
<meta http-equiv="cache-control" content="no-cache">  
<meta http-equiv="expires" content="0">  
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">  
<meta http-equiv="description" content="This is my page">  
<script type="text/javascript" src="./js/validator.js"></script>
<body >  
    <form action="adduser.action" method="post" onSubmit="return Validator.Validate(this,3)">  
        <table width="500" align="center">  
            <caption>ADD USER INFORMATION</caption>  
              
            <tr height="26px">  
                <td width="150px" align="right">RoleID</td>  
                <td width="350px">  
               
                    <input type="text"  name="user.roleid" value=""/>  
                </td>  
            </tr> 
      
              <tr height="26px">  
                <td width="150px" align="right">DeptID</td>  
                <td width="350px">  
                
                    <select name="user.dept.deptid">
   <option value="">
   </option>
   <c:forEach var="dept" items="${depts }" >
   <option value=${dept.deptid }>${dept.deptname }</option>
   </c:forEach>
  </select>
                </td>  
            </tr> 
             <tr height="26px">  
                <td width="150px" align="right">UserName</td>  
                <td width="350px">  
                  
                    <input type="text"  name="user.username" dataType="Require" msg="输入不能为空" />  
                </td>  
            </tr> 
              <tr height="26px">  
                <td width="150px" align="right">UserPwd</td>  
                <td width="350px">  
                
                    <input type="text"  name="user.userpwd" dataType="Require" msg="输入不能为空"/>  
                </td>  
            </tr> 
               <tr height="26px">  
                <td width="150px" align="right">UserState</td>  
                <td width="350px">  
                
                    <input type="text"  name="user.userstate" dataType="Require" msg="输入不能为空" />  
                </td>  
            </tr> 
             <tr height="26px">  
                <td width="150px" align="right">Sex</td>  
                <td width="350px">  
                  <select name="user.sex">
                              <option value="男">男</option>
                              <option value="女">女</option>
                     </select>
                   
                </td>  
            </tr> 

               <tr height="26px">  
                <td colspan="2"  align="center" width="500">  
                    <input type="submit" value="Save"/>  
                    <input type="button" value="Back" onclick="window.history.back(-1)"/>  
                </td>  
            </tr>  
            
           
        </table> 
         
    </form>  
 

</body>  
</html>  